package com.demiroot.server.pages;

import com.demiroot.server.HTTPResponse;
import com.demiroot.server.HTTPResquest;
import com.demiroot.server.ServerUtils;
import com.demiroot.server.pages.JavaPageResponse;
import com.demiroot.server.pages.Page;

public class TestPage implements Page {

	@Override
	public HTTPResponse getPage(HTTPResquest request) {
		String ret = "<html>";
		ret += ServerUtils.md5("Hello") + "<br>\n";
		ret += "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"webtoolkit.md5.js\"></SCRIPT>\n";
		ret += "<SCRIPT LANGUATE=\"JavaScript\">\ndocument.write(MD5(\"Hello\"));\n</script>";
		ret += "<html>";
		JavaPageResponse jpr = new JavaPageResponse(ret);
		return jpr;
	}

	public static boolean isThisYou(String file) {
		return file.equalsIgnoreCase("test");
	}

}
